﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    /// <summary>
    /// 进货订单明细
    /// </summary>
    public class WmsOrderDetails
    {
        /// <summary>
        /// 进货明细id（自增主键）
        /// </summary>
        [Key]
        public int purchase_details_id { get; set; }

        public int Product_ID { get; set; }

        /// <summary>
        /// 进货id（关联进货主表）
        /// </summary>
        public int? purchase_id { get; set; }  // 允许为空，对应SQL中的NULL

        /// <summary>
        /// 进货单价
        /// </summary>
        public decimal purchase_unit_price { get; set; }  // decimal(18,2)对应C#的decimal

        /// <summary>
        /// 货品数量
        /// </summary>
        public int prod_num { get; set; }

        /// <summary>
        /// 退货数量
        /// </summary>
        public int purreturn_num { get; set; }

        /// <summary>
        /// 已入库数量
        /// </summary>
        public int stkIn_num { get; set; }

        /// <summary>
        /// 备注（最长150字符）
        /// </summary>
        public string note { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string create_by { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string update_by { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime update_time { get; set; }

        /// <summary>
        /// 是否删除（通常 '0' 为未删除，'1' 为已删除）
        /// </summary>
        public string is_delete { get; set; }  // char(1)对应C#的string
        
    }
}
